package org.linys.service.dict;

import java.util.List;

import org.linys.dao.dict.GoodsDAO;
import org.linys.model.dict.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsServ {
	private GoodsDAO goodsDAO;

	public GoodsDAO getGoodsDAO() {
		return goodsDAO;
	}
	@Autowired
	public void setGoodsDAO(GoodsDAO goodsDAO) {
		this.goodsDAO = goodsDAO;
	}

	public int count(Goods goods) {
		return goodsDAO.count(goods);
	}

	public List<Goods> view(Goods goods, Integer start, Integer rows) {
		return goodsDAO.view(goods,start,rows);
	}
	public int save(Goods goods) {
		return goodsDAO.save(goods);
	}
	public int update(Goods goods) {
		return goodsDAO.update(goods);
	}
	public int deleteByID(Integer id) {
		return goodsDAO.deleteByID(id);
	}
	public int countChoose(Goods goods) {
		return goodsDAO.countChoose(goods);
	}
	public List<Goods> viewChoose(Goods goods, Integer start, Integer rows) {
		return goodsDAO.viewChoose(goods,start,rows);
	}
	public Goods getByID(Goods goods) {
		return goodsDAO.getByID(goods);
	}

	
	
}
